class singleInstance():
    instance = None

    def __new__(cls, *args, **kwargs):
        if cls.instance:
            return cls.instance
        cls.instance = object.__new__(cls)  # 创建一个新的对象
        return cls.instance
    
    def __init__(self, name):
        self.name = name 

obj1 = singleInstance("wayne")
obj2 = singleInstance("bob")
print(obj1==obj2) 
